//
// Forward declare functions
//

/* Currently no functions to forward declare */

//
// Set constants
//
const CTRLID_SELECT_DOWNLOAD_TYPE='DownloadTypes';
const CTRLID_DOWNLOAD_ACTIVITY='BtnDownloadActivity';

const VALUE_DOWNLOAD_TYPE_NONE = '';
const VALUE_DOWNLOAD_TYPE_QFX = 'QFX';
const VALUE_DOWNLOAD_TYPE_QIF = 'QIF';
const VALUE_DOWNLOAD_TYPE_IIF = 'IIF';
const VALUE_DOWNLOAD_TYPE_QBO = 'QBO';
const VALUE_DOWNLOAD_TYPE_OFX = 'OFX';
const VALUE_DOWNLOAD_TYPE_CSV = 'CSV';



function handleDownloadTransactionsPage(page)
{
    var fileFormatSelector = getElementByIdCompatible(CTRLID_SELECT_DOWNLOAD_TYPE);
    
    if (!validateControls(page.moniker, [fileFormatSelector])) return;
    
    fileFormatSelector.value = VALUE_DOWNLOAD_TYPE_QFX;

    
    var submitButton = getElementByIdCompatible(CTRLID_DOWNLOAD_ACTIVITY);

    if (!validateControls(page.moniker, [submitButton])) return;
    
    submitButton.click();
}
